package com.fuyao.cloud.asset.card.wrappers;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fuyao.cloud.asset.entity.AssetCard;
import com.fuyao.cloud.asset.enums.CardStatusEnum;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author lyhills
 * @Description
 * @date 2023/9/21 14:10
 * @Version 1.0
 */
public class CardWrappersUtil {

    /**
     * 创建资产构造器，过滤冲销和报废状态
     *
     * @return 资产构造器查询对象
     */
    public static LambdaQueryWrapper<AssetCard> getAssetCardFilterStatusWrapper() {
        List<String> cardStatusList = Collections.singletonList(CardStatusEnum.OFFSET.getCode());
        return Wrappers.<AssetCard>lambdaQuery().notIn(AssetCard::getStatus, cardStatusList);
    }
}
